package com.ywyt.elasticsearch.service;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface BaseSearchService {

    /*term查询
    * 参数:索引,类型,字段,字段值
    * */
    List<Map<String,Object>> termSearch(String index,String type,String field,String value) throws IOException;

    /*
    * terms查询
    * 参数同上
    * */
    List<Map<String,Object>> termsSearch(String index,String type,String field,String... values) throws IOException;

    /*
    * matchAll查询全部
    * */
    List<Map<String,Object>> matchAll(String index,String type) throws IOException;

    /*
    * match根据一个字段查询
    * */
    List<Map<String,Object>> match(String index,String type,String field,String value) throws IOException;

    /*
    * multiMatch根据多个字段查询
    * */
    List<Map<String,Object>> multiMatch(String index,String type,String[] field,String value) throws IOException;
}
